﻿<%@ include file="../include/top.jsp" %>
<%@ include file="../include/errorArea.jsp" %>
<link href="${baseURL}/css/public.css" rel="stylesheet" type="text/css"/>
<link href="${baseURL}/css/product.css" rel="stylesheet" type="text/css" />
<script>document.title="密码修改";</script>

<div class='section-right-order'>
	<div class='my-order'>
		<div class='my-order-left' >修改密码</div><div class='my-order-right'>&nbsp;</div>
	</div>
	<div>
		<div class='my-info'>
			<form method="POST" name="saveForm" action="${baseURL}/supplierAdmin/updatePW" onsubmit="return checkInput()">
			<table cellpadding=0 cellspacing=0>
				<tr>
					<td align='right'>原密码：</td>
					<td><input type="password" name="pw" id="password" size="20" class="myInput"></td>
				</tr>
				<tr>
					<td align='right'>新密码：</td>
					<td><input type="password" name="newPassword" id="newPassword" size="20" class="myInput"></td>
				</tr>
				<tr>
					<td align='right'>确认密码：</td>
					<td><input type="password" name="newPassword2" id="newPassword2" size="20" class="myInput"> 再输入一次新密码</td>
				</tr>
				<tr>
					<td align='center' colspan=2>
						<input type="submit" value="--&gt; 确认修改" class="button medium green">
						<!-- <a href="#" class="button medium green">提交</a> --> 
					</td>
				</tr>
			</table>
			</form>
		</div>
	</div>
</div>
<%-- <table width="100%" border="0" align=center cellpadding="4" cellspacing="1">
  
    
    <tr bgcolor="#FFFFFF"> 
      <td width="120" align="right">原密码：</td>
      <td> <input type="password" name="pw" id="password" size="20" class="myInput"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="right">新密码：</td>
      <td> <input type="password" name="newPassword" id="newPassword" size="20" class="myInput"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="right">确认密码：</td>
      <td> <input type="password" name="newPassword2" id="newPassword2" size="20" class="myInput"> 再输入一次新密码
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td></td>
      <td> <input type="submit" value="--&gt; 确认修改" class="myButton"> 
      <font color="red">${msg}</font></td>
    </tr>
  </form>
</table> --%>

<script>
function checkInput(){
	oldPassword = document.getElementById("password");
	if(oldPassword.value==""){
		alert("请输入旧密码。");
		oldPassword.focus();
		return false;
	}
	newPassword = document.getElementById("newPassword");
	if(newPassword.value==""){
		alert("请输入新密码。");
		newPassword.focus();
		return false;
	}
	newPassword2 = document.getElementById("newPassword2");
	if(newPassword2.value==""){
		alert("请输入新密码（确认）。");
		newPassword2.focus();
		return false;
	}
	if(newPassword.value!=newPassword2.value){
		alert("两次输入的新密码不一致。");
		newPassword.focus();
		return false;
	}
	return true;
}
</script>
<%@ include file="../include/bottom.jsp" %>